package com.hhh.demo.sx.util;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hhh.demo.sx.bean.Menu;

/**
 * @author lenovo
 * @create 2022/1/3 9:17
 */
public class MyBatisPlusWrapper<T> {

//    public IPage<T> Pagination(IService<T> service,int p, int limit , JSONObject conditions){
//        IPage<T> Page=null;
//        QueryWrapper<T> warpper = new QueryWrapper<>();
//        Page<Menu> pages = new Page<>(p, limit);
//
//        if (conditions != null) {
//            String username = (String) conditions.get("name");
//            warpper.like(!username.equals(""), "name", username);
//            Page = service.findAll(pages, warpper);
//        } else {
//            Page = service.findAll(pages, null);
//        }
//
//
//    }

}
